---
title: "File"
slug: /getting-started/types/file
description: "Learn about the File type in Dagger and how to use it for filesystem operations."
---

import MountCopyFile from "@cookbookFilesystem/_mount-copy-file.mdx";
import CopyFileRuntime from "@cookbookFilesystem/_copy-file-runtime.mdx";
import RequestFileHttp from "@cookbookFilesystem/_request-file-http.mdx";
import ExportDirectoryOrFileToHost from "@cookbookFilesystem/_export-directory-or-file-to-host.mdx";
import FileType from "@daggerTypes/_file.mdx";

<FileType />

:::tip
[Default paths](./directory.mdx#default-paths) are also available for `File` arguments. They
are commonly used to load constant filesystem locations, such as an
application's source code directory. Additionally, when a value is explicitly
passed for the argument, it always overrides the default path.
:::


## Examples

<MountCopyFile />
<CopyFileRuntime />
<RequestFileHttp />
<ExportDirectoryOrFileToHost />
